home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
doom
/
axxwar_1.zip
/
SOURCES
/
HOLOGRAM.QC
< prev
next >
Wrap
Text File
|
1997-02-27
|
4KB
|
154 lines
// AxxWars 0.8
// AXXHO START
.float numholo; // AXXHO
/*
==========
Spawn_hfog
==========
*/
void(vector org) spawn_hfog =
{
s = spawn ();
s.origin = org;
s.nextthink = time + 0.2;
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_TELEPORT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
remove (s);
};
/*
================
hologram_explode
================
*/
void(entity ex) hologram_explode =
{
ex.owner.numholo = ex.owner.numholo - 1;
makevectors(ex.angles);
sound (self, CHAN_VOICE, "player/holooff.wav", 1, ATTN_NORM);
spawn_hfog (ex.origin);
ex.nextthink = time + 0.1;
ex.think = SUB_Remove;
};
/*
==============
CheckForCamper
==============
*/
void() holo_touch =
{
makevectors(self.angles);
if (other == self.owner)
sound (self, CHAN_AUTO, "player/hologon.wav", 1, ATTN_NORM);
else
sound (self, CHAN_AUTO, "items/Inv1.wav", 1, ATTN_NORM);
spawn_hfog (self.origin);
};
/*
======
Holo_i
======
*/
void() holo_i =
{
self.touch = holo_touch;
self.owner.ammo_cells = self.owner.ammo_cells - 1;
if (self.owner.weapon == IT_LIGHTNING)
self.owner.currentammo = self.owner.ammo_cells;
if (self.owner.ammo_cells <= 0)
{
hologram_explode(self);
}
else
{
self.frame = self.frame + 1;
if (self.holotype == 1)
{
if (self.frame < 0 || self.frame > 12)
self.frame = 1;
self.colormap = 0;
}
else
if (self.holotype == 2)
{ // setmodel (hologram, "progs/shambler.mdl");
if (self.frame < 0 || self.frame > 16)
self.frame = 1;
self.colormap = 0;
}
else
{ // setmodel (hologram, "progs/player.mdl");
if (self.frame < 12 || self.frame > 16)
self.frame = 12;
self.colormap = self.owner.colormap;
}
self.skin = self.owner.skin;
self.nextthink = time + 0.5;
self.think = holo_i;
}
};
/*
===============
Launch_Hologram
===============
*/
void(vector org, vector dir) launch_hologram =
{
if ((self.ammo_cells < 12) || (self.numholo > 2))
return;
hologram = spawn ();
hologram.owner = self;
self.numholo = self.numholo + 1;
self.myhologram = hologram;
hologram.flags = FL_ITEM;
hologram.movetype = MOVETYPE_STEP;
hologram.solid = SOLID_TRIGGER;
hologram.angles = vectoangles(dir);
hologram.angles_x = 0;
// AXXSH START
if (self.class == CL_FIEND)
{
setmodel (hologram, "progs/demon.mdl");
self.holotype=1;
hologram.colormap = 0;
hologram.frame = 1;
}
else
if (self.class == CL_SHAMBLER)
{
setmodel (hologram, "progs/shambler.mdl");
self.holotype = 2;
hologram.colormap = 0;
hologram.frame = 1;
}
else
// AXXSH END
{
setmodel (hologram, "progs/player.mdl");
hologram.colormap = self.colormap;
hologram.frame = 13;
}
hologram.skin = self.skin_temp;
setsize (hologram, '-16 -16 -24', '16 16 40');
setorigin (hologram, org);
hologram.velocity = dir * 10;
hologram.classname = "hologram";
hologram.nextthink = time + 1;
hologram.think = holo_i;//This is the start of the
//bobbing up and down.
sound (self, CHAN_AUTO, "player/hologon.wav", 1, ATTN_NORM);
sprint (self, "Hologram launched...\n");
};
// AXXHO END